package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter@Getter@ToString
@AllArgsConstructor@NoArgsConstructor
public class OrderBill {
    public static final Integer NO_AUDITED = 0;
    public static final Integer AUDITED = 1;
    private Long id;
    private String sn;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date vdate;
    private Integer status = NO_AUDITED;//默认状态未审核
    private BigDecimal totalAmount;
    private BigDecimal totalNumber;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date auditTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputTime;
    //关联对象
    private Employee inputUser;//录入人
    private Employee auditor;//审核人
    private Supplier supplier;
    private Depot depot;
    private ProductSortTwo productSortTwo;//二级分类
    //包含订单明细
    private List<OrderBillItem> items = new ArrayList();
}